<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="{{ asset('css/ext.css') }}" />
    
    
<title>尤洪</title>
</head>
<body>
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="/images/extimg/logo.png" /></a></div>
    </div>
	<div class="regist">
    	<div class="log_img"><img src="/images/extimg/l_img.png" width="611" height="425" /></div>
		<div class="reg_c">
        	<form @submit.prevent="submit" method="POST">
            <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="95">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">注册</span>
                    <span class="fr">已有商城账号，<a href="{{url('login')}}" style="color:#ff4e00;">我要登录</a></span>
                </td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                <td><input type="text" value="" v-model="regist.user_name" class="l_user" place /></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                <td><input type="password" value="" v-model="regist.user_pwd" class="l_pwd" /></td>
              </tr>
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                <td><input type="password" value="" v-model="regist.user_lpwd" class="l_pwd" /></td>
              </tr>
              
              <tr height="50">
                <td align="right"><font color="#ff4e00">*</font>&nbsp;邮箱 &nbsp;</td>
                <td><input type="text" value="" v-model="regist.user_eml" class="l_email" placeholder="将发送验证码给您！"  />
              </td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox" v-model="regist.box" /></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="submit" value="立即注册" class="log_btn" /></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>   
<script src="{{ mix('js/app.js') }}"></script>
<script type = "text/javascript">
new Vue({ 
      el: '.reg_c', 
      data: { 
          regist:{} 
      }, 
      methods: { 
          submit: function() { 
            var data = this.regist;
            console.log(data)
            axios.post('http://shopapi.cn/api/auth/email_code', {
              user_name: data.user_name
              user_pwd: data.user_pwd
              user_lpwd: data.user_lpwd
              user_eml: data.user_eml
            })
            .then(function (response) {
              console.log(response)
                // layer.msg(response.data.msg,{icon:response.data.code,time:800},function(){
                //   if(response.data.msg == "登录成功"){
                //     axios.post('/do_login', {
                //       token: response.data.data.token,
                //     },).then(
                //       res => location.href="{{url('/')}}"
                //     );
                //   }
                // });
            })
            .catch(function (error) {
              alert(error.data.msg)
            });
            
          } 
      }, 
  }) 
</script>
</body>
</html>
